package com.xiaocheng.core.abstractfactory.factory;

public class FactoryProducer {
	public static CarFactory getFactory(String type){
		CarFactory carFactory;
		switch ( type) {
		case "shape":
			carFactory = new ShapeFactory();
			break;
		case "color":
			carFactory = new ColorFactory();
			break;
		default:
			carFactory = new ShapeFactory();
			break;
		}
		return carFactory;
	} 

}
